/* 
	对象结构化取值
 */
function parseStrMapObj(data, path) {
	if (/^\w+(?=\.)/.test(path)) {
		const [,name, next] = /^(\w+)\.(.*)/.exec(path);
		return parse(data[name], next);
	} else if (/^\w+(?=\[)/.test(path)) {
		const [,name, next] = /^(\w+)(.*)/.exec(path);
		return parse(data[name], next);
	} else if (/^\[\w+\]/.test(path)) {
		const [,name, next] = /^\[(\w+)\]\.?(.*)/.exec(path);
		return parse(data[name], next);
	} else {
		return path ? data[path] : data;
	}
}

export {
	parseStrMapObj
}